﻿using Autofac;

namespace CSharpLogger.Common
{

    public class ContainerBuilderFactory
    {
        private static object singleton = new object();

        private static volatile ContainerBuilder _container;

        public static ContainerBuilder ContainerBuilder
        {
            get
            {
                lock (singleton)
                {
                    if(_container == null)
                    {
                        _container = new ContainerBuilder();
                    }

                    return _container;
                }
            }
        }

        public static IContainer Container { get; set; }

    }
}
